package com.sais.manage.boot.platform.dto;

import com.sais.common.dto.BaseDTO;
import com.sais.manage.boot.platform.entity.UserInfo;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.time.LocalDate;

/**
 * 宿舍管理系统-用户添加 DTO
 *
 * @author zhang
 * @date 2019/11/30
 **/
@Data
@NoArgsConstructor
public class PersonalDTO extends BaseDTO {

    private String userId;
    private String telephone;
    private String phone;
    private String email;
    private String address;
    private String gender;
    private LocalDate birthday;
    private String introduction;
    private String username;

    public UserInfo convert() {
        UserInfo userinfo = new UserInfo();
        BeanUtils.copyProperties(this, userinfo);
        return userinfo;
    }


}
